Socket
Socket
Sign inDemoInstall

@poppinss/application

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@poppinss/application

AdonisJs application class to read app related data


Version published
Weekly downloads
4
increased by300%
Maintainers
1
Weekly downloads
 
Created
Source

Adonis application

circleci-image npm-image license-image

The application class for AdonisJs to know more about the environment and project structure of your AdonisJs applications.

Table of contents

Usage

Ideally you shouldn't be installing this module directly, since it is part of AdonisJs by default. However, installing module directly is helpful when testing AdonisJs specific addons.

npm i @poppinss/application

# Yarn
yarn add @poppinss/application

and then use it as follows:

import { Application } from '@poppinss/application'
import { Ioc } from '@adonisjs/fold'

const app = new Application(
  __dirname,
  new Ioc(),
  require('./adonisrc.json'),
  require('./package.json'),
)

The constructor takes 4 arguments, which you can fake during tests.

Argument positionDescription
1 (appRoot)The application root
2 (ioc)Instance of IoC container
3 (rcContents)Contents of .adonisrc.json file. You can also provide an empty object
4 (pkgFile)Pass the contents of package.json file. Required to pull the app name, version and so on

rcParser

The application instance will parse the contents of .adonisrc.json file. However, if you need the parser, you can access and use it as follows.

import { rcParser } from '@poppinss/application'
rcParser.parse(require('.adonisrc.json'))

API Docs

Following are the autogenerated files via Typedoc

Maintainers

Harminder virk

Keywords

FAQs

Package last updated on 29 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc